package com.sudo.boot.common.constant.enums;

import com.sudo.boot.base.constant.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 为道日损 2021-11-11 14:48
 */
@Getter
@AllArgsConstructor
public enum SysJobResult implements BaseEnum<String> {
    SUCCESS("success","成功"),
    FAIL("fail","失败");

    private final String code;
    private final String desc;

    public static Map<String,String> getEnumMap(){
        Map<String, String> enumMap = new HashMap<>();
        SysJobResult[] values = SysJobResult.values();
        for (SysJobResult value : values) {
            enumMap.put(value.getCode(), value.desc);
        }
        return enumMap;
    }
}
